﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="EvaluateQueries.aspx.cs" Inherits="QuerySelectionLabelingTool.EvaluateQueries" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style10
        {
        }
        .style11
        {
            width: 90px;
        }
        .style12
        {
            width: 255px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
        <div align="right"><asp:Label ID="labelIncomplete" runat="server"></asp:Label></div>
        <br />
        &nbsp;&nbsp; <br />
        <table style="width:100%;">
            <tr>
                <td class="style12">
        <asp:DropDownList ID="DropDownList1" runat="server" 
            DataSourceID="SqlDataSourceExistingTask" DataTextField="Expr1" 
            DataValueField="ID" Height="28px" Width="237px">
        </asp:DropDownList>
                </td>
                <td>
        <asp:Button ID="Button2" runat="server" onclick="Button2_Click" 
            Text="Get Existing Labeling Result" Height="29px" 
            style="margin-left: 0px"/>
                </td>
                <td align="right">
        <asp:Button ID="Button3" runat="server" Text="Next" 
         Height="29px" onclick="Button3_Click"/>
                </td>
            </tr>
        </table>
        <br />
        <table frame="box" rules="all">
            <tr>
                <td class="style11" align="center">
                    Title</td>
                <td align="center">
                <asp:Label ID="labelTitle" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style11" align="center">
                    Content</td>
                <td>
                <asp:Label ID="labelContent" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style10" colspan="2">
                    Please specify missing queries:<br />
                    (Use semicolon(;) to seperate multiple queries. Important for recall 
                    calculation.)<asp:TextBox ID="textBlockInputQueries" runat="server" Width="470px"></asp:TextBox>
                </td>
            </tr>
        </table>
        <br />
                <asp:Table ID="tableQueries" runat="server" GridLines="Both">
                </asp:Table>
        <br />
        <div align="right">
        <asp:Button ID="Button1" runat="server" Text="Next" 
         Height="29px" onclick="Button3_Click"/>
        </div>
        <br />
        <asp:SqlDataSource ID="SqlDataSourceExistingTask" runat="server" 
            ConnectionString="<%$ ConnectionStrings:QuerySelectionLabelingToolConnectionString %>" 
            SelectCommand="SELECT ID, CAST(ID AS varchar) + ' - ' + name + ' - ' + CAST(createTime AS varchar) AS Expr1 FROM tb_task WHERE (ID IN (SELECT taskID FROM tb_experiments AS tb_e WHERE (newsID = @newsID) AND (isComplete = 1) GROUP BY taskID))">
            <SelectParameters>
                <asp:SessionParameter Name="newsID" SessionField="currentNewsID" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:Label ID="labelMsg" runat="server" ForeColor="Red"></asp:Label>
            </ContentTemplate>
        </asp:UpdatePanel>
</asp:Content>
